<template>
  <div class="zhaofang">
    <!-- 顶部开始 -->
    <van-row>
      <van-col span="4" id="sanjiao">
        <router-link to="/dizhi" class="city">武汉<img src="/images/xiaosanjiao.png"></router-link>

      </van-col>
      <van-col span="20">
        <van-search v-model="value" placeholder="想住哪儿?" />
      </van-col>
    </van-row>
    <!-- 顶部结束 -->
    <van-grid :border="false" :clickable="true">
      <van-grid-item icon="/images/yuding.png" text="预定" />
      <van-grid-item icon="/images/qianyue.png" text="签约" />
      <van-grid-item icon="/images/miaosha.png" text="秒杀" />
      <van-grid-item icon="/images/dituzhaofang.png" text="地图找房" />
    </van-grid>
    <van-row style="font-size: 15px">
      <van-col span="8" class="quanbu" style="text-align: center">全部区域<img src="/images/xiaosanjiaodown.png" />
      </van-col>
      <van-col span="8" style="text-align: center">离我最近</van-col>
      <van-col span="8">
        <div class="paixu"><span style="margin-right:4px;">租金排序</span>
          <div class="arr">
            <div class="arrUp"></div>
            <div class="arrDown"></div>
          </div>
        </div>
      </van-col>
    </van-row>
    <!-- 小标签 -->
    <ul class="box">
      <li>新春优惠</li>
      <li>近地铁</li>
      <li>优惠</li>
      <li>VR看房</li>
      <li>视频看房</li>
      <li>新店</li>
      <li>智能门锁</li>
    </ul>
    <!-- 小标签 -->
    <!-- 房子详情 -->
    <van-card :desc="item.boyu_dizhi" :title="item.boyu_mname" :thumb="item.boyu_mphoto"
      v-for="(item, index) of boyu_mstore" :key="index">
      <template #tags>
        <van-tag plain type="primary">新春优惠</van-tag>
        <p class="jiagep">
          <span class="jiage">{{ item.boyu_mprice.slice(0, -3) }}</span>&nbsp; 元/月起
          <span class="julispan"><img src="/images/dingwei.png" />距您0km</span>
        </p>
      </template>
    </van-card>
    <!-- 房子详情 -->
    <div class="daohang"><img src="/images/ditu1.png" class="daohangimg" @click="dituanniu()"></div>
  </div>
</template>
<script>
  export default {
    data() {
      return {
        value: "",
        boyu_mstore: []
      };
    },
    mounted() {
      this.axios.get("/mstore").then(res => {
        this.boyu_mstore = res.data.results;
      });
    },
    methods: {
      dituanniu() {
        this.$router.push({
          path: "/ceshi",
          name: "ceshi"
        });
      }
    },
  };
</script>
<style scoped>
  .zhaofang {
    position: relative;
  }

  .daohang {
    position: absolute;
    position: fixed;
    right: 30px;
    bottom: 100px;
    width: 50px;
    height: 50px;
  }

  .daohangimg {
    border-radius: 50%;
    border: 0px solid #fff;
    width: 50px;
    height: 50px;
  }

  .zhaofang .van-grid-item__content {
    background-color: #fff;
  }

  .paixu {
    float: right;
  }

  .city {
    display: block;
    text-align: center;
    line-height: 54px;
    font-weight: bold;
    color: black;
  }

  #sanjiao img {
    width: 10%;
  }

  .quanbu img {
    width: 18%;
    vertical-align: middle;
  }

  .arr {
    width: 10px;
    float: right;
    padding-right: 25px;
  }

  .arrUp {
    width: 0;
    height: 0;
    border: 5px solid transparent;
    border-bottom-color: #ccc;
    cursor: pointer;
  }

  .arrDown {
    width: 0;
    height: 0;
    border: 5px solid transparent;
    border-top-color: #ccc;
    margin-top: 3px;
    cursor: pointer;
  }

  .box {
    white-space: nowrap;
    overflow-x: auto;
    margin-top: 7px;
    padding-left: 23px;
  }

  .box::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
  }

  li {
    list-style: none;
    display: inline-block;
    margin-right: 10px;
    background: #eee;
    text-align: center;
    border-radius: 10px;
    padding: 3px 7px;
    font-size: 14px;
    color: #807d7d;
  }

  .van-card__thumb {
    width: 118px;
    height: 84px;
  }

  .van-card__title {
    font-weight: bolder;
  }

  .van-tag {
    margin-top: 3px;
  }

  .jiagep {
    margin-top: 5px;
    font-size: 13px;
    font-weight: 600;
  }

  .jiage {
    color: burlywood;
    font-size: 18px;
  }

  .julispan {
    /* padding-left: 100px; */
    float: right;
    color: #888;
  }

  .julispan>img {
    vertical-align: middle;
  }
</style>